/**
 * 
 */
package p2;

import p1.Person;

/**
 * @author Janis Daubergs
 *
 */

public class Student extends Person{
    public int apliecNr;
    private String instituts;

    public int getApliecNr(){
        return this.apliecNr;
    }
    public String getInstitts(){
        return this.instituts;
    }
    public void setApliecNr(int newApliecNr){
        this.apliecNr=newApliecNr;
    }
    public void setInstituts(String newInstituts){
        this.instituts=newInstituts;
    }
    public Student(String n, String sn, int pc,int aNr,String i) {
        setName(n);
        setSurname(sn);
        setPersCode(pc);
        setApliecNr(aNr);
        setInstituts(i);
    }
   public Student(int aNr,String i) {
      setApliecNr(aNr);
      setInstituts(i);
}
    public Student() {
        apliecNr=12345678;
        instituts="LDI";
    }
    
    public String toString() {
           
             StringBuilder StudentString= new StringBuilder();
             StudentString.append(getName()).append(" ").append(getSurname()).append(" ").append(getPersCode()).append(" ").append(getApliecNr()).append(" ").append(getInstitts()).append(" ");
             String stud= new String(StudentString);
             return stud;
             }
}